import { Column, Entity, PrimaryGeneratedColumn } from 'typeorm';

@Entity('tb_address', {
  comment: '地址表',
})
export class Address {
  @PrimaryGeneratedColumn('increment', { comment: '自增主键', unsigned: true })
  id: number;

  @Column({ comment: '用户ID' })
  userId: number;

  @Column({ comment: '收件称呼' })
  name: string;

  @Column({ comment: '性别' })
  gender: string;

  @Column({ comment: '地址坐标' })
  coordinates: string;

  @Column({ comment: '详细地址' })
  address: string;

  @Column({ comment: '是否默认', type: 'tinyint', default: false })
  checked: boolean;
}
